fix(scheduler): keep succeeded pods visible so completing gangs are not evicted - #2022
Conversation
…ot evicted The pod informer filtered both Succeeded and Failed pods at watch time, so PodGroupInfo.IsStale never saw the Succeeded pods its guard relies on. A gang whose pods complete one by one was therefore judged stale, and stalegangeviction evicted the remaining running pods after the grace period. Filter only Failed pods at watch time and keep Succeeded visible, while leaving isTerminated (the Evict guard) treating both phases as terminal. Signed-off-by: Thezone-1 <somoprovobhattacharjee@gmail.com> (cherry picked from commit d0ef5e2)
… reads Succeeded pods are now watched, so the scheduler cache retains pod objects it previously dropped. A succeeded pod is excluded from every status group in pod_status, so it never reaches NodeInfo.AddTask and none of its spec is read. Transform succeeded pods to an allowlist of name, namespace, UID, phase, the podgroup annotation, and the subgroup and app labels. The phase drives getTaskStatus, the annotation and subgroup label drive PodGroupInfo.AddTaskInfo, and the app label keeps IsResourceReservationTask classifying correctly. Signed-off-by: Thezone-1 <somoprovobhattacharjee@gmail.com> (cherry picked from commit a09ac61)
The app label is only read by IsResourceReservationTask and IsScaleAdjustTask. Neither runs for a succeeded pod: node accounting and the proportion plugin both gate on IsActiveUsedStatus, which excludes Succeeded. The remaining caller, the reservation split in getNodeToPodInfosMap, would route the pod into nodeReservationPodInfosMap under an empty node name, which nothing drains, so retaining the label dropped succeeded reservation pods from the snapshot. Also drops the second changelog fragment and fixes map alignment in the test. Signed-off-by: Thezone-1 <somoprovobhattacharjee@gmail.com> (cherry picked from commit b06e3db)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📝 Changelog fragment recordedThanks! This PR added the changelog fragment(s) below. Pending fragments are folded into |
Description
Backport of #2012 to
v0.17.